package com.usian.user.feign;

import com.usian.model.article.ApAuthor;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "leadnews-article")
@RequestMapping("/api/v1/author")
public interface ArticleFeign {


    @PostMapping("/save")
    public ResponseResult save(@RequestBody ApAuthor apAuthor);

    @GetMapping("/findByUserId/{id}")
    public ApAuthor findByUserId(@PathVariable("id") Integer id);

    @GetMapping("/api/v1/author/one/{id}")
    ApAuthor selectById(@PathVariable("id") Integer id);
}
